package demo.util;

import java.util.Comparator;

import demo.trans.vo.HallMsgVO;

/**
 * 大厅消息排序器
 * @author Administrator
 *
 */
public class HallMsgCompare implements Comparator<HallMsgVO>{

	@Override
	public int compare(HallMsgVO o1, HallMsgVO o2) {
		if((o1.getPublishTime().compareTo(o2.getPublishTime())) > 0){
			return -1;
		} else if((o1.getPublishTime().compareTo(o2.getPublishTime())) < 0){
			return 1;
		} else {
			return 0;
		}
		
	}


}
